package com.lcz.manage.sys.service.consumer;

import org.springframework.beans.factory.InitializingBean;

import java.util.List;
import java.util.function.Consumer;

public interface IConsumer extends InitializingBean {


    void apply(String consumerId);

    default <T> void apply(List<T> list, Consumer<T> supplier){
        list.forEach(li -> {
            System.out.println("applys start...");
            supplier.accept(li);
            System.out.println("applys end...");
        });
    }
}
